1. Field of the Invention
The present invention relates generally to a network computer system in which virtual machine computer programs on a network are accepted and executed by clients as well as to a substitute compile server, and more particularly to a network computer system and a substitute compile server which accepts the virtual machine computer programs from the network and compiles the same for the delivery to clients that have issued requests.
2. Description of the Related Arts
With the recent spread of the internet, network computer systems for executing programs via networks have been put to practice use. Java language in particular is an object-oriented language and is subjected to a rapid spread due to some reasons including non-limitation to its platform providing the execution environment and executability of the programs on Web server pages. Java programs described in such Java language are distributed in the form of byte codes which are programs of Java Virtual Machine (JVM) permitting use of any platforms. This interferes with direct execution by the client""s computers, so that the execution of the Java programs necessitates emulation of the Java virtual machine codes by interpreter method on the client side. The interpreter method provides an emulation using a software for sequential interpretation of the byte codes and tends to induce a delayed execution as compared with the other languages. A possible solution to this may be a method using JIT (Just In Time) compilers on the client side. Previous to loading the byte code programs from the network to execute the same, the JIT compiler compiles the byte codes into native codes of the client machine, to thereby allow a direct execution by the client hardware, achieving a high-speed execution.
The following is a flow of basic processings in the case of using a Proxy server. Typically, by use of http protocol, a plurality of clients connected to a LAN sends to the Proxy server a request to acquire pages, images, programs, etc., of the Web server. When a client issues a request for example, the Proxy server makes a check to see whether the requested data is retained on a cache such as a hard disk, and if not it accesses the Web server by way of the external network to acquire the necessary data. The Proxy server retains the data acquired from the Web server on the cache such as the hard disk, while simultaneously it returns the same to the client that has issued the request. In case the data is retained on the cache, it is fetched from the cache and is returned to the client. Up until now, for this reason, when the client executes the Java programs lying in the Web server on the network, a client which has accepted a Java program from the Proxy server executes the Java program while compiling the same by use of the JIT compiler.
In case of providing the JIT compiler on the client side as in the prior art, however, there is required a time for the client to compile the Java program byte codes, which will affect the execution of the program.
Above all, in such an interactive environment having bidirectional data flow as to allow the request from the client to be returned to the server for processing or the results processed by the client to be delivered to the server, instead of the unidirectional data flow from the server to the client, it is essential to speed up the program rise time or response, so that much time is not to be allocated to the compilation. Furthermore, in order to speed up the execution of the programs it is necessary to perform a complicate optimization upon the compilation by the JIT compiler, and the complicated optimization may often result in an elongated compilation time. Alternatively, if the optimization is not carried out, then the compilation time is speeded up but the execution time is elongated, thus resulting a trade-off.
According to the present invention, a compiling function is imparted to a substitute server so that a computer system and a substitute compile server are provided which allows a client""s high-speed execution of a virtual machine computer program lying on a network.
The present invention provides a network computer system comprising a client for executing a virtual machine computer program lying on a network; and a substitute compile server for accepting the virtual machine computer program from the network in response to a request from the client, the substitute compile server compiling accepted the virtual machine computer program for the delivery to the client that has issued the request. In this manner, the present invention provides a high-speed substitute compile server in charge of JIT compiling on the client side, to achieve a rapid execution of the program by the client. As long as the substitute compile server has a sufficiently high speed in this case, any complicate optimization could be done upon the compilation, ensuring a further improvement in the client""s execution speed.
If, because of a difference between processors or the like used, the substitute compile server has a different execute form from that of the client, it compiles a virtual machine computer program in compliance with the execute form of the client. For example, the substitute compile server grasps the execute form of the client in advance so that it compiles the virtual machine computer program depending on the execute form of the requester client. The substitute compile server may compile the virtual machine computer program depending on the execute form requested by the client. The substitute compile server, when accepting the virtual machine computer program from the network, may perform compilations based on types of execute forms of connectable clients and may deliver compiled programs having a plurality of execute forms to the client, the substitute compile server allowing the client that has issued the request to select a compiled program in conformity with its own execute form. The substitute compile server delivers the compiled program to the client that has issued the request while simultaneously retaining the same on a cache, the substitute compile server delivering the compiled program retained on the cache in response to a request from the client. For this reason, even though the substitute compile server is not of a sufficiently high speed, the thus compiled program may be retained on the cache so that the second or later execution becomes feasible at a high speed although the first execution is time consuming.
The substitute compile server upon a request from the client predicts a virtual machine computer program to be next requested by the client and accepts the same from the network, the substitute compile server compiling the virtual machine computer program to be next requested, previous to retention on the cache. Such a predicting compilation ensures a higher speed execution by the client.
The substitute compile server retains on a cache the virtual machine computer program received from the network so that upon a request from a client the substitute compile server compiles the virtual machine computer program retained on the cache and delivers the same to the client. This reduces the storage capacity of the cache.
In this case as well, the substitute compile server upon a request from a client accepts from the network a virtual machine computer program requested as well as a virtual machine computer program predicted to be next requested by the client, the substitute compile server retaining two the virtual machine computer programs on the cache. Previous to the delivery, the substitute compile server compiles a byte code accepted in the form of the machine computer program into a machine code (native code) conforming to an execute form of the client that has issued the request.
The present invention also provides a substitute compile server. The substitute compile server comprises a controller for accepting, in response to a request from a client to execute a virtual machine computer program lying on a network, requested the computer program from the network; and a compile unit for compiling the program accepted by the controller, to deliver the same to the client that has issued the request. The substitute compile server may further comprise a cache for retaining the program compiled by the compile unit so that upon a request from the client the compiled program retained thereon is delivered to the client that has issued the request.
The above and other objects, aspects, features and advantages of the present invention will become more apparent from the following detailed description with reference to the accompanying drawings.